#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>

using namespace std;

void text_1()
{
	vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	for (auto i : v)
	{
		cout << i;
	}
	cout << endl;

	vector<int>::iterator it = v.begin();
	while (it != v.end())
	{
		cout << *it << ' ';
		++it;
	}
	cout << endl;

	auto rit = v.rbegin();
	while (rit != v.rend())
	{
		cout << *rit << ' ';
		++rit;
	}
	cout << endl;
}


int main()
{
	text_1();
	return 0;
}